//
//  RYWuliuCell.swift
//  SheYangBigData
//
//  Created by 宋海胜 on 2021/1/14.
//  Copyright © 2021 叁拾叁. All rights reserved.
//


import UIKit

class RYWuliuCell: SYBaseCell {

    var bgView: UIView = {
        let v: UIView = UIView()
        v.backgroundColor = .white
        return v
    }()
    
    var shixian: UIView = {
        let v: UIView = UIView()
        v.backgroundColor = UIColor(hex: 0xeeeeee)
        return v
    }()
    
    let firLb: UILabel = {
        let v:UILabel = UILabel()
        v.textColor = UIColor(hex: 0x333333)
        v.font = 13.autoFontSize()
        v.text = "[收货地址]上海市浦东新区东明路街道环林东路478号东明路街道办事处"
        v.numberOfLines = 0
        return v
    }()
    
    
    let pic: UIImageView = {
        let v: UIImageView = UIImageView()
        v.image = UIImage(named: "shou")
        return v
    }()

    
    
    
    override func initViews() {
        
        self.backgroundColor = .clear
        addSubview(bgView)
        bgView.addSubview(firLb)
        
        bgView.addSubview(pic)
        
        bgView.addSubview(shixian)
        
        bgView.snp.makeConstraints { (make) in
            make.top.bottom.equalToSuperview()
            make.left.equalToSuperview()
            make.right.equalToSuperview()
        }
        
        firLb.snp.makeConstraints { (make) in
            make.top.equalTo(bgView).offset(2.autoWidth())
            make.left.equalToSuperview().offset(89.autoWidth())
            make.right.equalToSuperview().offset(-14.autoWidth())
            make.bottom.equalToSuperview().offset(-30.autoWidth())
        }
        
        pic.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(3.autoWidth())
            make.left.equalToSuperview().offset(56.autoWidth())
            make.width.height.equalTo(23.autoWidth())
        }
       
        shixian.snp.makeConstraints { (make) in
            make.top.equalTo(pic.snp.bottom)
            make.centerX.equalTo(pic)
            make.bottom.equalToSuperview()
            make.width.equalTo(1.autoWidth())
        }
    }

    
}

// 签收、揽件、发货
class RYWuliuFahuoCell: SYBaseCell {

    var bgView: UIView = {
        let v: UIView = UIView()
        v.backgroundColor = .white
        return v
    }()
    
    var shixian: UIView = {
        let v: UIView = UIView()
        v.backgroundColor = UIColor(hex: 0xeeeeee)
        return v
    }()
    
    let firLb: UILabel = {
        let v:UILabel = UILabel()
        v.textColor = UIColor(hex: 0x9B9B9B)
        v.font = 17.autoFontSize()
        v.text = "已发货"
        return v
    }()
    
    let secLb: UILabel = {
        let v:UILabel = UILabel()
        v.textColor = UIColor(hex: 0x7F7F7F)
        v.font = 13.autoFontSize()
        v.text = "包裹正在等待揽收"
        return v
    }()
    
    
    let timeLb: UILabel = {
        let v:UILabel = UILabel()
        v.textColor = UIColor(hex: 0x898989)
        v.font = 11.autoFontSize()
        v.text = "15:48"
        return v
    }()
    let riqiLb: UILabel = {
        let v:UILabel = UILabel()
        v.textColor = UIColor(hex: 0x333333)
        v.font = 12.autoFontSize()
        v.text = "12-08"
        return v
    }()
    
    let pic: UIImageView = {
        let v: UIImageView = UIImageView()
        v.image = UIImage(named: "fuhua")
        return v
    }()

    
    
    
    override func initViews() {
        
        self.backgroundColor = .clear
        addSubview(bgView)
        bgView.addSubview(firLb)
        bgView.addSubview(secLb)
        bgView.addSubview(timeLb)
        bgView.addSubview(pic)
        bgView.addSubview(riqiLb)
        bgView.addSubview(shixian)
        
        bgView.snp.makeConstraints { (make) in
            make.top.bottom.equalToSuperview()
            make.left.equalToSuperview()
            make.right.equalToSuperview()
            make.height.equalTo(55.autoWidth())
        }
        
        firLb.snp.makeConstraints { (make) in
            make.top.equalTo(pic)
            make.left.equalToSuperview().offset(89.autoWidth())
            make.right.equalToSuperview().offset(-14.autoWidth())
            make.height.equalTo(18.autoWidth())
        }
        secLb.snp.makeConstraints { (make) in
            make.top.equalTo(pic).offset(23.autoWidth())
            make.left.equalToSuperview().offset(89.autoWidth())
            make.right.equalToSuperview().offset(-14.autoWidth())
            make.height.equalTo(13.autoWidth())
        }
        riqiLb.snp.makeConstraints { (make) in
            make.top.equalTo(pic)
            make.right.equalTo(pic.snp.left).offset(-11.autoWidth())
            make.height.equalTo(10.autoWidth())
        }
        timeLb.snp.makeConstraints { (make) in
            make.top.equalTo(pic).offset(12.autoWidth())
            make.right.equalTo(pic.snp.left).offset(-11.autoWidth())
            make.height.equalTo(10.autoWidth())
        }
        pic.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(3.autoWidth())
            make.left.equalToSuperview().offset(56.autoWidth())
            make.width.height.equalTo(23.autoWidth())
        }
       
        shixian.snp.makeConstraints { (make) in
            make.top.equalTo(pic.snp.bottom)
            make.centerX.equalTo(pic)
            make.bottom.equalToSuperview()
            make.width.equalTo(1.autoWidth())
        }
    }

    
}


// 运输途中
class RYWuliuZhuangcheCell: SYBaseCell {

    var bgView: UIView = {
        let v: UIView = UIView()
        v.backgroundColor = .white
        return v
    }()
    
    var shixian: UIView = {
        let v: UIView = UIView()
        v.backgroundColor = UIColor(hex: 0xeeeeee)
        return v
    }()
    
    let firLb: UILabel = {
        let v:UILabel = UILabel()
        v.textColor = UIColor(hex: 0x7F7F7F)
        v.font = 13.autoFontSize()
        v.text = "快件在【江苏省南京市】已装车，准备发往上海"
        v.numberOfLines = 0
        return v
    }()
    
    
    
    let timeLb: UILabel = {
        let v:UILabel = UILabel()
        v.textColor = UIColor(hex: 0x898989)
        v.font = 11.autoFontSize()
        v.text = "15:48"
        return v
    }()
    let riqiLb: UILabel = {
        let v:UILabel = UILabel()
        v.textColor = UIColor(hex: 0x333333)
        v.font = 12.autoFontSize()
        v.text = "12-08"
        return v
    }()
    
    let pic: UIImageView = {
        let v: UIImageView = UIImageView()
        v.image = UIImage(named: "zhuangche")
        return v
    }()

    
    
    
    override func initViews() {
        
        self.backgroundColor = .clear
        addSubview(bgView)
        bgView.addSubview(firLb)
        
        bgView.addSubview(timeLb)
        bgView.addSubview(riqiLb)
        bgView.addSubview(pic)
        
        bgView.addSubview(shixian)
        
        bgView.snp.makeConstraints { (make) in
            make.top.bottom.equalToSuperview()
            make.left.equalToSuperview()
            make.right.equalToSuperview()
            make.height.equalTo(55.autoWidth())
        }
        
        firLb.snp.makeConstraints { (make) in
            make.top.equalToSuperview()
            make.left.equalToSuperview().offset(89.autoWidth())
            make.right.equalToSuperview().offset(-14.autoWidth())
        }
       
        riqiLb.snp.makeConstraints { (make) in
            make.top.equalTo(pic)
            make.right.equalTo(pic.snp.left).offset(-11.autoWidth())
            make.height.equalTo(10.autoWidth())
        }
        timeLb.snp.makeConstraints { (make) in
            make.top.equalTo(pic).offset(12.autoWidth())
            make.right.equalTo(pic.snp.left).offset(-11.autoWidth())
            make.height.equalTo(10.autoWidth())
        }
        pic.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(3.autoWidth())
            make.left.equalToSuperview().offset(56.autoWidth())
            make.width.height.equalTo(23.autoWidth())
        }
       
        shixian.snp.makeConstraints { (make) in
            make.top.equalTo(pic.snp.bottom)
            make.centerX.equalTo(pic)
            make.bottom.equalToSuperview()
            make.width.equalTo(1.autoWidth())
        }
    }

    
}


class RYYuanhuTopCell: SYBaseCell {
    
    var bgView: UIView = {
        let v: UIView = UIView()
        v.backgroundColor = .white
        v.layer.cornerRadius = 10
        return v
    }()
    
    override func initViews() {
        self.backgroundColor = .clear
        self.clipsToBounds = true
        addSubview(bgView)
        bgView.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(10)
            make.left.right.equalToSuperview()
            make.height.equalTo(20)
            make.bottom.equalToSuperview().offset(10.autoWidth())
        }
    }
}



class RYYuanhuBottomCell: SYBaseCell {
    
    var bgView: UIView = {
        let v: UIView = UIView()
        v.backgroundColor = .white
        v.layer.cornerRadius = 10
        return v
    }()
    
    override func initViews() {
        self.backgroundColor = .clear
        self.clipsToBounds = true
        addSubview(bgView)
        bgView.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(-10)
            make.left.right.equalToSuperview()
            make.height.equalTo(20)
            make.bottom.equalToSuperview()
        }
    }
}
